The STYLE() function can be added to an existing formula in a cell. For example, together with the CURRENT function, you can color a cell depending on its value. The formula =...+STYLE(IF(CURRENT()>3; "Red"; "Green")) applies the cell style "Red" to cells if the value is greater than 3, otherwise the cell style "Green" is applied.
STYLE() 関数は、セル内の既存の数式に追加することができます。 たとえば、CURRENT 関数と共に使用し、入っている値にもとづいてセルに色を付けることができます。 数式 =...+STYLE(IF(CURRENT()>3; "Red"; "Green")) は、値が 3 を超える場合はセルのスタイルとして "Red (赤)" を、値が 3 を超えない場合はセルスタイル "Green (緑)" をセルに適用することを意味します。
If you would like to apply a formula to all cells in a selected area, you can use the dialog.
選択したセル範囲のすべてのセルに数式を適用するには、ダイアログ 検索と置換 を使用します。
Select all the desired cells.
該当するセルを全て選択します。
Select the menu command Edit - Find & Replace.
メニューから編集 → 検索と置換 を選択します。
For the term, enter: .*
用語の検索を入力してください: .*
".*" is a regular expression that designates the contents of the current cell.
「.*」は、現在のセルの内容すべてを示す正規表現です。
Enter the following formula in the field: =&+STYLE(IF(CURRENT()>3;"Red";"Green"))
置換フィールドに次の数式を入力してください。=&+STYLE(IF(CURRENT()>3;"Red";"Green"))
The "&" symbol designates the current contents of the Search for field. The line must begin with an equal sign, since it is a formula. It is assumed that the cell styles "Red" and "Green" already exist.
記号「&」は、検索テキスト の現在の内容を示す正規表現です。行は数式であるため、イコール記号で始まる必要があります。ここては、「赤」と「緑」という名前のセルスタイルがすでに存在すると仮定します。
Mark the fields Regular expressions and Current selection only. Click Find All.
正規表現 と 選択範囲のみ をオンにします。すべて検索 をクリックします。
All cells with contents that were included in the selection are now highlighted.
選択範囲内で内容が入力されているセルは、反転表示されます。
Click .
をクリック。